<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>扩展运算符应用</title>
</head>
<body>
    <div></div>
    <div></div>
    <div></div>
    <script>
        //1. 数组的合并 
        // let arr = [1,2,3,4];
        // let arr1 = [5,6,7];
        // let arr2 = [...arr,...arr1];
        //2. 新数组克隆

        // let arr3 = [11,22,33];
        // let arr4 = [...arr3];
        // arr4[1] = 0;
        // console.log(arr3,arr4);
       
        //3. 将伪数组转为真正的数组

        let divs = document.querySelectorAll('div');
        // console.log(divs);

        let arr = [...divs];
        console.log(arr);
        //4. 字符串展开
        
    </script>
</body>
</html>